/*
 * File name: CCamera.h
 * Author:    Tom Krajnik
 */

#ifndef __CCAMERA_H__
#define __CCAMERA_H__

#include "CRawImage.h" 
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>


//-----------------------------------------------------------------------------
// Class CCamera
//-----------------------------------------------------------------------------
//! A CCamera class
/*! class to represent robot's camera
 */
class CCamera
{

	public:
	bool initialized;

	CCamera();
	int init(const char *directory);
	~CCamera();
	int renewImage(CRawImage* image);

	void setGain(int value);
	int getGain();

	void setExposition(int value);
	int getExposition();
	
	void setBrightness(int value);
	int getBrightness();
	int setDeviceAutoExposure(const bool val);

	private:

	CRawImage defaultImage;
	int exposition;
	int brightness;
	int gain;
	char directory[2000];
	int fileNum;
	struct vdIn *videoIn;
	int width, height;
};
#endif
/* end of CCamera.h */
